import React from 'react'
import { BrowserRouter as Router, Route, Redirect } from "react-router-dom";
import home from './view/home'
import city from './view/city'
function App() {
  return (
    <Router>
      <div className='App'>
        {/*
          exact 开启精准匹配模式
        */}
        
        {/* 重定向 */}
        <Route exact path='/' render={() => <Redirect to ='/home'/>} ></Route>
        
        <Route path='/home' component={home}></Route>
        <Route path='/city' component={city}></Route>
      </div>
    </Router>
  )
}

export default App;
